using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using QLTB.Forms;
using QLTB.FormsMonitor;

namespace QLTB
{
    public partial class FrmMain : Office2007RibbonForm
    {
        #region fields
        public static FrmMain me;
        FrmNhomQuanLy m_FrmNhomQuanLy = null;
        FrmNguoiQuanLy m_FrmNguoiQUanLy = null;
        FrmPhongCallCenter501 m_FrmPhongCallCenter501 = null;
        FrmLoaiThietBi m_FrmLoaiThietBi = null;
        FrmThietBi m_FrmThietBi = null;
        FrmPhongBan m_FrmPhongBan = null;
        FrmDanhMucLoi m_FrmDanhMucLoi = null;
        FrmDanhSachThietBi m_FrmDanhSachThietBi = null;
        FrmNhaCungCap m_FrmNhaCungCap = null;
        FrmViTri m_FrmViTri = null;
        FrmNhomLoi m_FrmNhomLoi = null;


       
        #endregion
        public FrmMain()
        {
            InitializeComponent();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {

        }

        private void btnNhomquanly_Click(object sender, EventArgs e)
        {
            if (m_FrmNhomQuanLy == null || m_FrmNhomQuanLy.IsDisposed)
            {
                m_FrmNhomQuanLy = new FrmNhomQuanLy();
                m_FrmNhomQuanLy.MdiParent = FrmMain.ActiveForm;
                m_FrmNhomQuanLy.Show();
            }
            else m_FrmNhomQuanLy.Activate();
        }

        private void btnquanly_Click(object sender, EventArgs e)
        {
            if (m_FrmNguoiQUanLy == null || m_FrmNguoiQUanLy.IsDisposed)
            {
                m_FrmNguoiQUanLy = new FrmNguoiQuanLy();
                m_FrmNguoiQUanLy.MdiParent = FrmMain.ActiveForm;
                m_FrmNguoiQUanLy.Show();
            }
            else m_FrmNguoiQUanLy.Activate();
        }

        private void btncallcenter501_Click(object sender, EventArgs e)
        {
            if (m_FrmPhongCallCenter501 == null || m_FrmPhongCallCenter501.IsDisposed)
            {
                m_FrmPhongCallCenter501 = new FrmPhongCallCenter501();
                m_FrmPhongCallCenter501.MdiParent = FrmMain.ActiveForm;
               
                m_FrmPhongCallCenter501.Show();
            }
            else m_FrmPhongCallCenter501.Activate();
        }

        private void btnDanhmucTB_Click(object sender, EventArgs e)
        {
            if (m_FrmThietBi == null || m_FrmThietBi.IsDisposed)
            {
                m_FrmThietBi = new FrmThietBi();
                m_FrmThietBi.MdiParent = FrmMain.ActiveForm;
                m_FrmThietBi.Show();
            }
            else m_FrmThietBi.Activate();
        }

        private void btnDanhmucLTB_Click(object sender, EventArgs e)
        {
            if (m_FrmLoaiThietBi == null || m_FrmLoaiThietBi.IsDisposed)
            {
                m_FrmLoaiThietBi = new FrmLoaiThietBi();
                m_FrmLoaiThietBi.MdiParent = FrmMain.ActiveForm;
                m_FrmLoaiThietBi.Show();
            }
            else m_FrmLoaiThietBi.Activate();
        }

        private void btnDanhsachTB_Click(object sender, EventArgs e)
        {
            if (m_FrmDanhSachThietBi == null || m_FrmDanhSachThietBi.IsDisposed)
            {
                m_FrmDanhSachThietBi = new FrmDanhSachThietBi();
                m_FrmDanhSachThietBi.MdiParent = FrmMain.ActiveForm;
                m_FrmDanhSachThietBi.Show();
            }
            else m_FrmDanhSachThietBi.Activate();
        }

        private void btnDanhsachVT_Click(object sender, EventArgs e)
        {
            if (m_FrmViTri == null || m_FrmViTri.IsDisposed)
            {
                m_FrmViTri = new FrmViTri();
                m_FrmViTri.MdiParent = FrmMain.ActiveForm;
                m_FrmViTri.Show();
            }
            else m_FrmViTri.Activate();
        }

        private void btnDanhMucPB_Click(object sender, EventArgs e)
        {
            if (m_FrmPhongBan == null || m_FrmPhongBan.IsDisposed)
            {
                m_FrmPhongBan = new FrmPhongBan();
                m_FrmPhongBan.MdiParent = FrmMain.ActiveForm;
                m_FrmPhongBan.Show();
            }
            else m_FrmPhongBan.Activate();
        }

        private void btnNhaCC_Click(object sender, EventArgs e)
        {
            if (m_FrmNhaCungCap == null || m_FrmNhaCungCap.IsDisposed)
            {
                m_FrmNhaCungCap = new FrmNhaCungCap();
                m_FrmNhaCungCap.MdiParent = FrmMain.ActiveForm;
                m_FrmNhaCungCap.Show();
            }
            else m_FrmNhaCungCap.Activate();
        }

        private void btnDanhSachLoaiLoi_Click(object sender, EventArgs e)
        {
            if (m_FrmNhomLoi == null || m_FrmNhomLoi.IsDisposed)
            {
                m_FrmNhomLoi = new FrmNhomLoi();
                m_FrmNhomLoi.MdiParent = FrmMain.ActiveForm;
                m_FrmNhomLoi.Show();
            }
            else m_FrmNhomLoi.Activate();
        }

        private void btnDanhsachLoi_Click(object sender, EventArgs e)
        {
            if (m_FrmDanhMucLoi == null || m_FrmDanhMucLoi.IsDisposed)
            {
                m_FrmDanhMucLoi = new FrmDanhMucLoi();
                m_FrmDanhMucLoi.MdiParent = FrmMain.ActiveForm;
                m_FrmDanhMucLoi.Show();
            }
            else m_FrmDanhMucLoi.Activate();
        }

      
       
        
    }
}